package com.fyl.pattern.state.after;

/**
 * 具体状态角色
 */
public class ClosingState extends LiftState{

    @Override
    public void open() {
        context.setLiftState(Context.openingState);
        context.getLiftState().open();
    }

    @Override
    public void close() {
        System.out.println("电梯门关闭");
    }

    @Override
    public void run() {
        context.setLiftState(Context.runningState);
        context.getLiftState().run();
    }

    @Override
    public void stop() {
context.setLiftState(Context.stoppingState);
context.getLiftState().stop();
    }
}
